package com.xinshujia.utils;

/**
 * *************************************
 * *   @author: 野狼上校               **
 * *   @since: 2024-08-07 09:30       **
 * *   @version: 1.0                  **
 * *************************************
 * <p>
 *     与硬件交互命令常量字符串（json格式）
 */
public class FunctionConstants {
    /*关闭采集*/
    public static final String FUNCTION_CLOSE_COLLECT = "{\"function\" :\"write_register_uint16\",\"regaddr\":4,\"regcount\":1,\"regcontent\":0}";

    /*开启采集*/
    public static final String FUNCTION_OPEN_COLLECT = "{\"function\" :\"write_register_uint16\",\"regaddr\":4,\"regcount\":1,\"regcontent\":1}";

    /*开启预警*/
    public static final String FUNCTION_OPEN_ALARM_X = "{\"function\" :\"write_register_uint16\",\"regaddr\":22092,\"regcount\":1,\"regcontent\":1}";
    public static final String FUNCTION_OPEN_ALARM_Y = "{\"function\" :\"write_register_uint16\",\"regaddr\":22097,\"regcount\":1,\"regcontent\":1}";
    public static final String FUNCTION_OPEN_ALARM_Z = "{\"function\" :\"write_register_uint16\",\"regaddr\":22102,\"regcount\":1,\"regcontent\":1}";

    /*关闭预警*/
    public static final String FUNCTION_CLOSE_ALARM_X = "{\"function\" :\"write_register_uint16\",\"regaddr\":22092,\"regcount\":1,\"regcontent\":0}";
    public static final String FUNCTION_CLOSE_ALARM_Y = "{\"function\" :\"write_register_uint16\",\"regaddr\":22097,\"regcount\":1,\"regcontent\":0}";
    public static final String FUNCTION_CLOSE_ALARM_Z = "{\"function\" :\"write_register_uint16\",\"regaddr\":22102,\"regcount\":1,\"regcontent\":0}";

    /*清除预警*/
    public static final String FUNCTION_CLEAR_ALARM = "{\"function\" :\"write_register_uint32\",\"regaddr\":22266,\"regcount\":2,\"regcontent\":15}";

    /*查询阈值*/
    public static final String FUNCTION_FIND_THRESHOLD_X = "{\"function\" :\"read_register_float32\",\"regaddr\":22093,\"regcount\":2}";
    public static final String FUNCTION_FIND_THRESHOLD_Y = "{\"function\" :\"read_register_float32\",\"regaddr\":22098,\"regcount\":2}";
    public static final String FUNCTION_FIND_THRESHOLD_Z = "{\"function\" :\"read_register_float32\",\"regaddr\":22103,\"regcount\":2}";

    /*修改阈值*/
    public static final String FUNCTION_UPDATE_THRESHOLD_X = "{\"function\":\"write_register_float32\",\"regaddr\":22093,\"regcount\":2,\"regcontent\":";
    public static final String FUNCTION_UPDATE_THRESHOLD_Y = "{\"function\":\"write_register_float32\",\"regaddr\":22098,\"regcount\":2,\"regcontent\":";
    public static final String FUNCTION_UPDATE_THRESHOLD_Z = "{\"function\":\"write_register_float32\",\"regaddr\":22103,\"regcount\":2,\"regcontent\":";

}
